package cn.bdqn.pn.controller.schedule;


import cn.bdqn.pn.pojo.commodity.Commodity;
import cn.bdqn.pn.pojo.commodity.Ticketinginfo;
import cn.bdqn.pn.pojo.schedule.Commoditysession;
import cn.bdqn.pn.service.schedule.impl.CommoditysessionServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("CommoditysessionController")
public class CommoditysessionController {
    @Autowired
    CommoditysessionServiceImpl commoditysessionService;




    @ResponseBody
    @RequestMapping("/saveCommodity")
    /**
     * 新增商品信息
     */
    public Integer addCommodity(Commoditysession commoditysession){
        System.out.println(commoditysession.getPlaceId()+"++"+commoditysession.getSessiontime()+"+++"+commoditysession.getSessiontime()+"+++"+commoditysession.getEndtime());
        Commoditysession Comm= commoditysessionService.addCommoditysession(commoditysession);
        if (Comm!=null){
            return 1;
        }else{
            return 2;
        }
    }
}
